<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>PHP QrCode Liblary: QRcode Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">PHP QrCode Liblary
   &#160;<span id="projectnumber">2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="class_q_rcode-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QRcode Class Reference<div class="ingroups"><a class="el" href="group___core_group.html">Standard API Core</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p><b>Main class to create QR-code</b>.  
 <a href="class_q_rcode.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a86f4b9d2a130a910d92e2de8eeb4f715"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#a86f4b9d2a130a910d92e2de8eeb4f715">encodeMask</a> (<a class="el" href="class_q_rinput.html">QRinput</a> $input, $mask)</td></tr>
<tr class="memdesc:a86f4b9d2a130a910d92e2de8eeb4f715"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode mask Main function responsible for creating code.  <a href="#a86f4b9d2a130a910d92e2de8eeb4f715">More...</a><br/></td></tr>
<tr class="separator:a86f4b9d2a130a910d92e2de8eeb4f715"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0dc4095c1b8cec362be7533edd0fc681"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#a0dc4095c1b8cec362be7533edd0fc681">encodeInput</a> (<a class="el" href="class_q_rinput.html">QRinput</a> $input)</td></tr>
<tr class="memdesc:a0dc4095c1b8cec362be7533edd0fc681"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode input with mask detection.  <a href="#a0dc4095c1b8cec362be7533edd0fc681">More...</a><br/></td></tr>
<tr class="separator:a0dc4095c1b8cec362be7533edd0fc681"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7e9149161a1898a2235e66d856fbfe4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#af7e9149161a1898a2235e66d856fbfe4">encodeString8bit</a> ($string, $version, $level)</td></tr>
<tr class="memdesc:af7e9149161a1898a2235e66d856fbfe4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode string, forcing 8-bit encoding.  <a href="#af7e9149161a1898a2235e66d856fbfe4">More...</a><br/></td></tr>
<tr class="separator:af7e9149161a1898a2235e66d856fbfe4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a346c0f1183a79b96159cffad3e1ba327"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#a346c0f1183a79b96159cffad3e1ba327">encodeString</a> ($string, $version, $level, $hint, $casesensitive)</td></tr>
<tr class="memdesc:a346c0f1183a79b96159cffad3e1ba327"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encode string, using optimal encodings.  <a href="#a346c0f1183a79b96159cffad3e1ba327">More...</a><br/></td></tr>
<tr class="separator:a346c0f1183a79b96159cffad3e1ba327"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a1b90c0989105afa06b6e1c718a454fb5"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#a1b90c0989105afa06b6e1c718a454fb5">png</a> ($<a class="el" href="class_q_rcode.html#adedfeaa77e994ef490facefbe171137e">text</a>, $outfile=false, $level=<a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a>, $size=3, $margin=4, $saveandprint=false)</td></tr>
<tr class="memdesc:a1b90c0989105afa06b6e1c718a454fb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates PNG image containing QR-Code.  <a href="#a1b90c0989105afa06b6e1c718a454fb5">More...</a><br/></td></tr>
<tr class="separator:a1b90c0989105afa06b6e1c718a454fb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adedfeaa77e994ef490facefbe171137e"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#adedfeaa77e994ef490facefbe171137e">text</a> ($text, $outfile=false, $level=<a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a>, $size=3, $margin=4)</td></tr>
<tr class="memdesc:adedfeaa77e994ef490facefbe171137e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates text (1's &amp; 0's) containing QR-Code.  <a href="#adedfeaa77e994ef490facefbe171137e">More...</a><br/></td></tr>
<tr class="separator:adedfeaa77e994ef490facefbe171137e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abab58ac89ce34bc4e1abe838fbc05ad2"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#abab58ac89ce34bc4e1abe838fbc05ad2">raw</a> ($<a class="el" href="class_q_rcode.html#adedfeaa77e994ef490facefbe171137e">text</a>, $outfile=false, $level=<a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a>, $size=3, $margin=4)</td></tr>
<tr class="memdesc:abab58ac89ce34bc4e1abe838fbc05ad2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates Raw Array containing QR-Code.  <a href="#abab58ac89ce34bc4e1abe838fbc05ad2">More...</a><br/></td></tr>
<tr class="separator:abab58ac89ce34bc4e1abe838fbc05ad2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a036166ee2cabf2089f0d7744f0e5b7ab"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#a036166ee2cabf2089f0d7744f0e5b7ab">canvas</a> ($<a class="el" href="class_q_rcode.html#adedfeaa77e994ef490facefbe171137e">text</a>, $elemId=false, $level=<a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a>, $width=false, $size=false, $margin=4, $autoInclude=false)</td></tr>
<tr class="memdesc:a036166ee2cabf2089f0d7744f0e5b7ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates Html+JS code to draw QR-Code with HTML5 Canvas.  <a href="#a036166ee2cabf2089f0d7744f0e5b7ab">More...</a><br/></td></tr>
<tr class="separator:a036166ee2cabf2089f0d7744f0e5b7ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a952a9d42bdd7cfa8249757d7a87d9e63"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#a952a9d42bdd7cfa8249757d7a87d9e63">svg</a> ($<a class="el" href="class_q_rcode.html#adedfeaa77e994ef490facefbe171137e">text</a>, $elemId=false, $outFile=false, $level=<a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a>, $width=false, $size=false, $margin=4, $compress=false)</td></tr>
<tr class="memdesc:a952a9d42bdd7cfa8249757d7a87d9e63"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates SVG with QR-Code.  <a href="#a952a9d42bdd7cfa8249757d7a87d9e63">More...</a><br/></td></tr>
<tr class="separator:a952a9d42bdd7cfa8249757d7a87d9e63"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a687736ec7606992efda2b182b0ddfd05"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a687736ec7606992efda2b182b0ddfd05"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#a687736ec7606992efda2b182b0ddfd05">$version</a></td></tr>
<tr class="memdesc:a687736ec7606992efda2b182b0ddfd05"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Integer</b> QR code version. Size of <a class="el" href="class_q_rcode.html" title="Main class to create QR-code. ">QRcode</a> is defined as version. Version is from 1 to 40. Version 1 is 21*21 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177*177 matrix. <br/></td></tr>
<tr class="separator:a687736ec7606992efda2b182b0ddfd05"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a945ac2a752d469cf3a1fc287e9cd9fca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a945ac2a752d469cf3a1fc287e9cd9fca"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#a945ac2a752d469cf3a1fc287e9cd9fca">$width</a></td></tr>
<tr class="memdesc:a945ac2a752d469cf3a1fc287e9cd9fca"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Integer</b> Width of code table. Because code is square shaped - same as height. <br/></td></tr>
<tr class="separator:a945ac2a752d469cf3a1fc287e9cd9fca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77cb4d4aaf9f89774aa14f763284dd89"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a77cb4d4aaf9f89774aa14f763284dd89"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#a77cb4d4aaf9f89774aa14f763284dd89">$data</a></td></tr>
<tr class="memdesc:a77cb4d4aaf9f89774aa14f763284dd89"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Array</b> Ready, masked code data. <br/></td></tr>
<tr class="separator:a77cb4d4aaf9f89774aa14f763284dd89"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:ac9fcf29895f0ee66f4a8aa3fa0db484e"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_q_rcode.html#ac9fcf29895f0ee66f4a8aa3fa0db484e">$jscanvasincluded</a> = false</td></tr>
<tr class="memdesc:ac9fcf29895f0ee66f4a8aa3fa0db484e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Canvas JS include flag.  <a href="#ac9fcf29895f0ee66f4a8aa3fa0db484e">More...</a><br/></td></tr>
<tr class="separator:ac9fcf29895f0ee66f4a8aa3fa0db484e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><b>Main class to create QR-code</b>. </p>
<p>QR Code symbol is a 2D barcode that can be scanned by handy terminals such as a mobile phone with CCD. The capacity of QR Code is up to 7000 digits or 4000 characters, and has high robustness. This class supports QR Code model 2, described in JIS (Japanese Industrial Standards) X0510:2004 or ISO/IEC 18004.</p>
<p>Currently the following features are not supported: ECI and FNC1 mode, Micro QR Code, QR Code model 1, Structured mode.</p>
<p>Class for generating QR-code images, SVG and HTML5 Canvas </p>
<dl class="section author"><dt>Author</dt><dd>Dominik Dzienia </dd></dl>
<dl class="section copyright"><dt>Copyright</dt><dd>2010-2013 Dominik Dzienia and others <a class="el" href=""><a href="http://www.gnu.org/copyleft/lesser.html">http://www.gnu.org/copyleft/lesser.html</a> LGPL </a></dd></dl>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a036166ee2cabf2089f0d7744f0e5b7ab"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static QRcode::canvas </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$elemId</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$level</em> = <code><a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$width</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$size</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$margin</em> = <code>4</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$autoInclude</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates Html+JS code to draw QR-Code with HTML5 Canvas. </p>
<p>Simple helper function to create QR-Code array with one static call. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$text</td><td>text string to encode </td></tr>
    <tr><td class="paramtype">String</td><td class="paramname">$elemId</td><td>(optional) target Canvas tag id attribute, if <b>false</b> Canvas tag with auto id will be created </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$level</td><td>(optional) error correction level <b>QR_ECLEVEL_L</b>, <b>QR_ECLEVEL_M</b>, <b>QR_ECLEVEL_Q</b> or <b>QR_ECLEVEL_H</b> </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$width</td><td>(optional) CANVAS element width (sam as height) </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$size</td><td>(optional) pixel size, multiplier for each 'virtual' pixel </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$margin</td><td>(optional) code margin (silent zone) in 'virtual' pixels </td></tr>
    <tr><td class="paramtype">Boolean</td><td class="paramname">$autoInclude</td><td>(optional) if <b>true</b>, required qrcanvas.js lib will be included (only once) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String containing JavaScript creating the code, Canvas element (when $elemId is <b>false</b>) and script tag with required lib (when $autoInclude is <b>true</b> and not yet included) </dd></dl>

</div>
</div>
<a class="anchor" id="a0dc4095c1b8cec362be7533edd0fc681"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRcode::encodeInput </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_q_rinput.html">QRinput</a>&#160;</td>
          <td class="paramname"><em>$input</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encode input with mask detection. </p>
<p>Shorthand for encodeMask, without specifing particular, static mask number.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype"><a class="el" href="class_q_rinput.html">QRinput</a></td><td class="paramname">$input</td><td>data object to be encoded </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd></dd></dl>

</div>
</div>
<a class="anchor" id="a86f4b9d2a130a910d92e2de8eeb4f715"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRcode::encodeMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_q_rinput.html">QRinput</a>&#160;</td>
          <td class="paramname"><em>$input</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encode mask Main function responsible for creating code. </p>
<p>We get empty frame, then fill it with data from input, then select best mask and apply it. If $mask argument is greater than -1 we assume that user want's that specific mask number (ranging form 0-7) to be used. Otherwise (when $mask is -1) mask is detected using algorithm depending of global configuration,</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype"><a class="el" href="class_q_rinput.html">QRinput</a></td><td class="paramname">$input</td><td>data object </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$mask</td><td>sugested masking mode </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_q_rcode.html" title="Main class to create QR-code. ">QRcode</a> $this (current instance) </dd></dl>

</div>
</div>
<a class="anchor" id="a346c0f1183a79b96159cffad3e1ba327"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRcode::encodeString </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$string</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$level</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$hint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$casesensitive</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encode string, using optimal encodings. </p>
<p>Encode string dynamically adjusting encoding for subsections of string to minimize resulting code size. For complex string it will split string into subsections: Numerical, Alphanumerical or 8-bit. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$string</td><td>input string </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$version</td><td>code version (size of code area) </td></tr>
    <tr><td class="paramtype">String</td><td class="paramname">$level</td><td>ECC level (see: Global Constants -&gt; Levels of Error Correction) </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$hint</td><td><b>QR_MODE_8</b> or <b>QR_MODE_KANJI</b>, Because Kanji encoding is kind of 8 bit encoding we need to hint encoder to use Kanji mode explicite. (otherwise it may try to encode it as plain 8 bit stream) </td></tr>
    <tr><td class="paramtype">Boolean</td><td class="paramname">$casesensitive</td><td>hint if given string is case-sensitive, because if not - encoder may use optimal QR_MODE_AN instead of QR_MODE_8 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_q_rcode.html" title="Main class to create QR-code. ">QRcode</a> $this (current instance) </dd></dl>

</div>
</div>
<a class="anchor" id="af7e9149161a1898a2235e66d856fbfe4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QRcode::encodeString8bit </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$string</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$level</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encode string, forcing 8-bit encoding. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$string</td><td>input string </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$version</td><td>code version (size of code area) </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$level</td><td>ECC level (see: Global Constants -&gt; Levels of Error Correction) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="class_q_rcode.html" title="Main class to create QR-code. ">QRcode</a> $this (current instance) </dd></dl>

</div>
</div>
<a class="anchor" id="a1b90c0989105afa06b6e1c718a454fb5"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static QRcode::png </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$outfile</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$level</em> = <code><a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$size</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$margin</em> = <code>4</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$saveandprint</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates PNG image containing QR-Code. </p>
<p>Simple helper function to create QR-Code Png image with one static call. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$text</td><td>text string to encode </td></tr>
    <tr><td class="paramtype">String</td><td class="paramname">$outfile</td><td>(optional) output file name, if <b>false</b> outputs to browser with required headers </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$level</td><td>(optional) error correction level <b>QR_ECLEVEL_L</b>, <b>QR_ECLEVEL_M</b>, <b>QR_ECLEVEL_Q</b> or <b>QR_ECLEVEL_H</b> </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$size</td><td>(optional) pixel size, multiplier for each 'virtual' pixel </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$margin</td><td>(optional) code margin (silent zone) in 'virtual' pixels </td></tr>
    <tr><td class="paramtype">Boolean</td><td class="paramname">$saveandprint</td><td>(optional) if <b>true</b> code is outputed to browser and saved to file, otherwise only saved to file. It is effective only if $outfile is specified. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abab58ac89ce34bc4e1abe838fbc05ad2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static QRcode::raw </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$outfile</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$level</em> = <code><a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$size</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$margin</em> = <code>4</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates Raw Array containing QR-Code. </p>
<p>Simple helper function to create QR-Code array with one static call. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$text</td><td>text string to encode </td></tr>
    <tr><td class="paramtype">Boolean</td><td class="paramname">$outfile</td><td>(optional) not used, shuold be <b>false</b> </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$level</td><td>(optional) error correction level <b>QR_ECLEVEL_L</b>, <b>QR_ECLEVEL_M</b>, <b>QR_ECLEVEL_Q</b> or <b>QR_ECLEVEL_H</b> </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$size</td><td>(optional) pixel size, multiplier for each 'virtual' pixel </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$margin</td><td>(optional) code margin (silent zone) in 'virtual' pixels </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Array containing Raw QR code </dd></dl>

</div>
</div>
<a class="anchor" id="a952a9d42bdd7cfa8249757d7a87d9e63"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static QRcode::svg </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$elemId</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$outFile</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$level</em> = <code><a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$width</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$size</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$margin</em> = <code>4</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$compress</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates SVG with QR-Code. </p>
<p>Simple helper function to create QR-Code SVG with one static call. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$text</td><td>text string to encode </td></tr>
    <tr><td class="paramtype">Boolean</td><td class="paramname">$elemId</td><td>(optional) target SVG tag id attribute, if <b>false</b> SVG tag with auto id will be created </td></tr>
    <tr><td class="paramtype">String</td><td class="paramname">$outfile</td><td>(optional) output file name, when <b>false</b> file is not saved </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$level</td><td>(optional) error correction level <b>QR_ECLEVEL_L</b>, <b>QR_ECLEVEL_M</b>, <b>QR_ECLEVEL_Q</b> or <b>QR_ECLEVEL_H</b> </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$width</td><td>(optional) SVG element width (sam as height) </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$size</td><td>(optional) pixel size, multiplier for each 'virtual' pixel </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$margin</td><td>(optional) code margin (silent zone) in 'virtual' pixels </td></tr>
    <tr><td class="paramtype">Boolean</td><td class="paramname">$compress</td><td>(optional) if <b>true</b>, compressed SVGZ (instead plaintext SVG) is saved to file </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String containing SVG tag </dd></dl>

</div>
</div>
<a class="anchor" id="adedfeaa77e994ef490facefbe171137e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static QRcode::text </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$outfile</em> = <code>false</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$level</em> = <code><a class="el" href="group___q_r___c_o_n_s_t.html#gae106d3baebd9c27c90b2abadb25df012">QR_ECLEVEL_L</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$size</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$margin</em> = <code>4</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Creates text (1's &amp; 0's) containing QR-Code. </p>
<p>Simple helper function to create QR-Code text with one static call. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramtype">String</td><td class="paramname">$text</td><td>text string to encode </td></tr>
    <tr><td class="paramtype">String</td><td class="paramname">$outfile</td><td>(optional) output file name, when <b>false</b> file is not saved </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$level</td><td>(optional) error correction level <b>QR_ECLEVEL_L</b>, <b>QR_ECLEVEL_M</b>, <b>QR_ECLEVEL_Q</b> or <b>QR_ECLEVEL_H</b> </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$size</td><td>(optional) pixel size, multiplier for each 'virtual' pixel </td></tr>
    <tr><td class="paramtype">Integer</td><td class="paramname">$margin</td><td>(optional) code margin (silent zone) in 'virtual' pixels </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Array containing line of code with 1 and 0 for every code line </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ac9fcf29895f0ee66f4a8aa3fa0db484e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">QRcode::$jscanvasincluded = false</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Canvas JS include flag. </p>
<p>If canvas js support library was included, we remember it static in <a class="el" href="class_q_rcode.html" title="Main class to create QR-code. ">QRcode</a>. (because file should be included only once) </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>lib/full/qrencode.php</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun May 26 2013 14:47:13 for PHP QrCode Liblary by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
